package com.lzh.shijicloudstack.model.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.lzh.shijicloudstack.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * <p>
 * 请求日志表（目前用于记录请求日志）
 * </p>
 *
 * @author luzhiheng
 * @since 2024-08-13
 */
@TableName("sys_operation_log")
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "sys_operation_log", indexes = {})
public class SysOperationLog extends BaseEntity {

    /**
     * 操作人ID
     */
    @Column(name = "operation_user_id", columnDefinition = "varchar(255) COMMENT '操作人ID'")
    private String operationUserId;

    /**
     * 操作模块
     */
    @Column(name = "operation_module", columnDefinition = "varchar(255) COMMENT '操作模块'")
    private String operationModule;

    /**
     * 具体操作事件
     */
    @Column(name = "operation_events", columnDefinition = "varchar(255) COMMENT '具体操作事件'")
    private String operationEvents;

    /**
     * 操作URL
     */
    @Column(name = "operation_url", columnDefinition = "varchar(255) COMMENT '操作URL'")
    private String operationUrl;

    /**
     * 操作附带数据
     */
    @Column(name = "operation_data", columnDefinition = "varchar(255) COMMENT '操作附带数据'")
    private String operationData;

    /**
     * 操作状态：0操作异常 1操作正常
     */
    @Column(name = "operation_status", columnDefinition = "int COMMENT '操作状态：0操作异常 1操作正常'")
    private Integer operationStatus;

    /**
     * 操作所在IP
     */
    @Column(name = "operation_ip", columnDefinition = "varchar(255) COMMENT '操作所在IP'")
    private String operationIp;

    /**
     * 操作结果
     */
    @Column(name = "operation_result", columnDefinition = "varchar(255) COMMENT '操作结果'")
    private String operationResult;

    /**
     * 请求耗时
     */
    @Column(name = "request_time_consume", columnDefinition = "bigint COMMENT '请求耗时'")
    private Long requestTimeConsume;

}
